/**
 * 教师-班级
 */

const router = require('express').Router()
const db = require('../db')
const toWhere = require('../utils').toWhere

// 教师所教班级
router.get('/view', (req, res) => {
    // console.log('req.query', req.query)
    let where = JSON.parse(req.query.where)
    let sql = toWhere('teacher_class_view', where, 'classId, className')
    db.query(sql[0], sql[1], data => {
        res.json({ code: 0, data })
    })
})



module.exports = router